package cn.maidouya.hrm.client;

import cn.maidouya.hrm.doc.CourseDoc;
import cn.maidouya.hrm.query.CourseDocQuery;
import cn.maidouya.hrm.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * hystrix托底回调数据
 */
@FeignClient(value = "HRM-ES",fallbackFactory = CourseDocFeignFallbackFactory.class)
@RequestMapping("/courseDoc")
public interface ICourDocFeignClient {
    // es上线
    @PostMapping("/onLine")
    AjaxResult onLineCourse(@RequestBody List<CourseDoc> courseDoc);
    // es下线
    @PostMapping("/offLine")
    AjaxResult offLineCourse(@RequestBody List<Long> ids);
    // 主站课程展示
    @PostMapping("/queryCourses")
    AjaxResult queryCourses(@RequestBody CourseDocQuery courseDocQuery);
}